package com.lxyk.dao.monthly;

import com.lxyk.domain.Job;
import org.apache.ibatis.annotations.*;

import java.util.List;
import java.util.Map;

/**
 * @ClassName JobDao
 * @Description TODO
 * @Author FJQ
 * @Date 2022/4/10 18:36
 * @Version 1.0
 **/
@Mapper
public interface JobDao {

    //查询学生就业信息
    List<Job> selectAll(Map map);

    //新增就业学生
    @Insert("INSERT INTO job VALUES(#{id},#{name},#{className},#{city},#{trial},#{money},#{company},#{jobDate},#{position})")
    int addJob(Job job);

    //根据id删除学生月考成绩
    @Delete("DELETE FROM job WHERE id =#{id}")
    boolean deleteJobById(Integer id);

    //根据id查询
    @Select("SELECT * FROM job where id = #{id}")
    Job selectJobById(Integer id);

    //修改学生月考成绩
    @Update("UPDATE job SET name=#{name},className=#{className},city=#{city},trial=#{trial},money=#{money}," +
            "company=#{company},jobDate=#{jobDate},position=#{position},status=#{status} where id = #{id}")
    boolean updateJob(Job job);

    //班级毕业，学生全部流入就业表
    Integer addStudentJob(Integer cid);


}
